#include <iostream>
#include <vector>
#include <climits>
using namespace std;

int main()
{
    long long n = 0, k = 0;
    cin >> n >> k;
    vector<long long> a(n, 0);
    vector<long long> b(n, 0);
    long long a_sum = 0;
    long long b_sum = 0;
    long long happy = 0;
    long long begin = 0;
    long long shame = INT_MAX;
    for (long long i = 0; i < n; i++)
    {
        cin >> a[i];
    }
    for (long long i = 0; i < n; i++)
    {
        cin >> b[i];
    }

    for (long long left = 0, right = 0; right < n; right++)
    {
        a_sum += a[right];
        b_sum += b[right];
        while (right - left + 1 > k)
        {
            a_sum -= a[left];
            b_sum -= b[left];
            left++;
        }
        if (right - left + 1 == k)
        {
            if (a_sum > happy || (a_sum == happy && b_sum < shame))
            {
                happy = a_sum;
                shame = b_sum;
                begin = left;
            }
        }
    }
    cout << (begin + 1) << endl;
    return 0;
}